home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / prolog / sbprolog / amiga / builtin2.zoo / builtin.h < prev    next >
C/C++ Source or Header  |  1989-08-16  |  3KB  |  133 lines

  1. /************************************************************************
  2. *                                    *
  3. * The SB-Prolog System                            *
  4. * Copyright SUNY at Stony Brook, 1986; University of Arizona, 1987    *
  5. *                                    *
  6. ************************************************************************/
  7.  
  8. /*-----------------------------------------------------------------
  9. SB-Prolog is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY.  No author or distributor
  11. accepts responsibility to anyone for the consequences of using it
  12. or for whether it serves any particular purpose or works at all,
  13. unless he says so in writing.  Refer to the SB-Prolog General Public
  14. License for full details.
  15.  
  16. Everyone is granted permission to copy, modify and redistribute
  17. SB-Prolog, but only under the conditions described in the
  18. SB-Prolog General Public License.   A copy of this license is
  19. supposed to have been given to you along with SB-Prolog so you
  20. can know your rights and responsibilities.  It should be in a
  21. file named COPYING.  Among other things, the copyright notice
  22. and this notice must be preserved on all copies. 
  23. ------------------------------------------------------------------ */
  24.  
  25. /* builtin.h */
  26.  
  27. #define CALL 10
  28. #define LOAD 11
  29.  
  30. #define STLOOKUP 15
  31. #define RESET 16
  32. #define REWRITE 17
  33. #define GET0 18
  34. #define GET  19
  35. #define SKIP 20
  36. #define READ 21
  37. #define READNAME 22
  38. #define CLOSE 23
  39. #define PUT 24
  40. #define TAB 25
  41. #define NL  26
  42. #define FILEERRORS 28
  43. #define NOFILEERRORS 29
  44. #define SEE    30
  45. #define SEEING    31
  46. #define SEEN    32
  47. #define TELL    33
  48. #define TELLING 34
  49. #define TOLD    35
  50. #define GETHOSTBYNAME 39
  51.  
  52. #define STATISTICS0 40
  53. #define STATISTICS 41
  54. #define SYMTYPE 42
  55. #define HASHVAL 43
  56.  
  57. #define SUBSTRING 51
  58. #define SUBNUMBER 52
  59. #define SUBDELIM  53
  60. #define CONLENGTH 54
  61.  
  62. #define WRITE4    59
  63. #define ARITH    60
  64. #define FLOATC    61
  65. #define REAL 62
  66. #define FLOOR0 63
  67. #define VAR 64
  68. #define NONVAR 65
  69. #define ATOM 66
  70. #define INTEGER 67
  71. #define ATOMIC 68
  72. #define ARITY 69
  73. #define CPUTIME 70
  74. #define STATS 71
  75. #define DBREF 72
  76. #define COMPARE 73
  77. #define SAVE 74
  78. #define RESTORE 75
  79.  
  80. #define ALLOC_BUFF 76
  81. #define BUFF_CODE  77
  82. #define TRIMBUFF  79
  83.  
  84. #define ARG0 80
  85. #define FUNCTOR0 81
  86. #define SYSTEM0 82
  87. #define SYSCALL 83
  88. #define BLDSTR  84
  89. #define MKSTR   85
  90. #define BLDATOM 98
  91. #define NAME0 99
  92. #define BROCALL 100
  93. #define ERRNO 101
  94.  
  95. #define TRACE 110
  96. #define PILTRACE 111
  97. #define UNTRACE 112
  98. #define FLAGS 113
  99.  
  100. #define TERMREP 127
  101. #define NUMBER 128
  102. #define STRUCTURE 129
  103. #define WRITEQNAME 130
  104. #define WRITENAME 133
  105.  
  106. #define CURSES 134    /* for curses interface */
  107. #define NEXT_TOKEN 135    /* O'Keefe's modified tokeniser */
  108.  
  109. /* extern unsigned short no_buf_err; */
  110.  
  111. #ifdef AMIGA 
  112. #include "/sim.h"
  113. #include "/aux.h"
  114. #else
  115. #include "../sim.h"
  116. #include "../aux.h"
  117. #endif
  118. #include <math.h>
  119.  
  120. extern int (*branch_table[])();
  121.  
  122.  
  123.  
  124. /* #define arity0(x)    get_arity((x).psc_ptr) */
  125.     /* assumes that x is the first word of a structure */
  126.  
  127. /* #define to_con_str_ptr(term) \
  128.     deref(term); \
  129.     if (islist(term) ||  var(term))  {Fail0;} \
  130.     untag(term) */
  131. /* deref term (regs  or temp var); if list or free variable, fail; o/w get
  132.    the pointer to the con_str node in the heap */
  133.